package com.bw.module_live

import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.bw.lib_common.base.BaseFragment
import com.bw.lib_common.utils.ToastUtils
import com.bw.module_live.anchor.CreateLiveActivity
import com.bw.module_live.databinding.FragmentLiveBinding
import com.bw.module_live.fans.LiveActivity
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class LiveFragment : BaseFragment() {
    private val mBinding:FragmentLiveBinding by lazy {
        FragmentLiveBinding.inflate(layoutInflater)
    }
    override fun getFragmentRootView(): View {
        return mBinding.root
    }

    override fun initView() {
        super.initView()

    }
    override fun initEvent() {
        mBinding.btStart.setOnClickListener {
            ToastUtils.showLong(requireActivity(),"开始直播")
//            ARouter.getInstance().build("/module_live/CreateLiveActivity").navigation()
            startActivity(Intent(this.activity, CreateLiveActivity::class.java))

        }
        mBinding.btLook.setOnClickListener {
            startActivity(Intent(this.activity, LiveActivity::class.java))
        }
    }


}